<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  

  
  <title>海晨忆的博客</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  
  
  <meta name="description" content="我负责征战天下，你负责貌美如花！">
<meta property="og:type" content="website">
<meta property="og:title" content="海晨忆的博客">
<meta property="og:url" content="https://haichenyi.com/page/4/index.html">
<meta property="og:site_name" content="海晨忆的博客">
<meta property="og:description" content="我负责征战天下，你负责貌美如花！">
<meta property="og:locale" content="zh-Hans">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="海晨忆的博客">
<meta name="twitter:description" content="我负责征战天下，你负责貌美如花！">
  
    <link rel="alternate" href="/atom.xml" title="海晨忆的博客" type="application/atom+xml">
  
  
    <link rel="icon" href="/uploads/artistic_image/head.jpg">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/css/style.css">
  <link rel="stylesheet" href="/css/highlight.css">
  <script>
  let antiquityStorage = window.sessionStorage.getItem('antiquitySessionStorage');
  if (antiquityStorage == '' || antiquityStorage == null) {
    var antiquityLoader = '<div id="loaderbox"><div class="loader"><div class="load-roll"><div class="load-top"></div><div class="load-right"></div><div class="load-bottom"></div></div></div></div>';
    document.write(antiquityLoader);
    document.body.style.overflow = 'hidden'
  }
  </script>
</head>

<body>
  <div id="fullpage" class="mobile-nav-right">
    
      <div id="wrapper" style="background-image: url(/uploads/artistic_image/bg.jpg)" title="背景图片来自网络">
    
    
      <header id="header">
  <div id="nav-toggle" class="nav-toggle"></div>
  <div class="head-box global-width">
    <nav class="nav-box nav-right">
      
        <a class="nav-item" href="/" title
        
        >首页</a>
      
        <a class="nav-item" href="/archives" title
        
        >归档</a>
      
        <a class="nav-item" href="/about" title
        
        >简历</a>
      
    </nav>
  </div>
</header>
      <div id="middlecontent" title class="global-width sidebar-left">
        <section id="main">
  
    <article id="post-kotlin之构造函数-constructor" class="article global-container article-type-post" itemscope itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/2019/06/12/kotlin之构造函数-constructor/">kotlin之构造函数(constructor)</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/2019/06/12/kotlin之构造函数-constructor/" class="article-date">
  <time datetime="2019-06-12T14:27:43.000Z" itemprop="datePublished">2019-06-12</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/kotlin/">kotlin</a>
  </div>

    
  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-cloud doorframe mac" itemprop="articleBody">
      
        <p>&emsp;&emsp;java中的构造函数是与类名相同即可，kotlin里面的构造函数是用constructor关键字表示。</p>
        
          <p class="article-more-link">
            <a href="/2019/06/12/kotlin之构造函数-constructor/#more">阅读全文</a>
          </p>
        
      
    </div>
    
  </div>
  
  
</article>

  
    <article id="post-kotlin之扩展函数let，run，also，apply" class="article global-container article-type-post" itemscope itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/2019/06/11/kotlin之扩展函数let，run，also，apply/">kotlin之扩展函数let，run，also，apply</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/2019/06/11/kotlin之扩展函数let，run，also，apply/" class="article-date">
  <time datetime="2019-06-11T14:33:50.000Z" itemprop="datePublished">2019-06-11</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/kotlin/">kotlin</a>
  </div>

    
  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-cloud doorframe mac" itemprop="articleBody">
      
        <p>举个例子</p>
        
          <p class="article-more-link">
            <a href="/2019/06/11/kotlin之扩展函数let，run，also，apply/#more">阅读全文</a>
          </p>
        
      
    </div>
    
  </div>
  
  
</article>

  
    <article id="post-kotlin之基础" class="article global-container article-type-post" itemscope itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/2019/06/11/kotlin之基础/">kotlin之基础</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/2019/06/11/kotlin之基础/" class="article-date">
  <time datetime="2019-06-11T14:33:36.000Z" itemprop="datePublished">2019-06-11</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/kotlin/">kotlin</a>
  </div>

    
  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-cloud doorframe mac" itemprop="articleBody">
      
        <p>&emsp;&emsp;自从18年上一家公司用kotlin做了项目之后，新公司就没有用过kotlin了，都快要忘完了，最近又想起来了，再捡了一下吧。</p>
        
          <p class="article-more-link">
            <a href="/2019/06/11/kotlin之基础/#more">阅读全文</a>
          </p>
        
      
    </div>
    
  </div>
  
  
</article>

  
    <article id="post-Android——Tensorflow-Lite简单使用" class="article global-container article-type-post" itemscope itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/2019/06/11/Android——Tensorflow-Lite简单使用/">Android——Tensorflow-Lite简单使用</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/2019/06/11/Android——Tensorflow-Lite简单使用/" class="article-date">
  <time datetime="2019-06-11T14:33:16.000Z" itemprop="datePublished">2019-06-11</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/Android-常用功能/">Android -常用功能</a>
  </div>

    
  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-cloud doorframe mac" itemprop="articleBody">
      
        <p>&emsp;&emsp;项目里面用到了tflite，用于做简单的图片处理，不是判断图片是什么类型，就是传进去图片，生成新图片，类似于前面一篇讲的GPUImage的滤镜功能，但是比滤镜功能更加强大。</p>
        
          <p class="article-more-link">
            <a href="/2019/06/11/Android——Tensorflow-Lite简单使用/#more">阅读全文</a>
          </p>
        
      
    </div>
    
  </div>
  
  
</article>

  
    <article id="post-图片滤镜——GPUImage" class="article global-container article-type-post" itemscope itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/2019/06/11/图片滤镜——GPUImage/">图片滤镜——GPUImage</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/2019/06/11/图片滤镜——GPUImage/" class="article-date">
  <time datetime="2019-06-11T14:32:53.000Z" itemprop="datePublished">2019-06-11</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/Android-常用功能/">Android -常用功能</a>
  </div>

    
  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-cloud doorframe mac" itemprop="articleBody">
      
        <p>&emsp;&emsp;<a href="https://github.com/cats-oss/android-gpuimage" target="_blank" rel="noopener">GPUImage</a>图片滤镜处理的第三方开源库，对照IOS版的GPUImage写的,部分功能尚未完善，目前也有很多种滤镜，常用的滤镜基本上都有，请先浏览一遍github上面的用法。</p>
        
          <p class="article-more-link">
            <a href="/2019/06/11/图片滤镜——GPUImage/#more">阅读全文</a>
          </p>
        
      
    </div>
    
  </div>
  
  
</article>

  
    <article id="post-JDBC的简单使用——MySQL" class="article global-container article-type-post" itemscope itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/2018/10/11/JDBC的简单使用——MySQL/">JDBC的简单使用——MySQL</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/2018/10/11/JDBC的简单使用——MySQL/" class="article-date">
  <time datetime="2018-10-11T14:51:00.000Z" itemprop="datePublished">2018-10-11</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/数据库-JDBC/">数据库 -JDBC</a>
  </div>

    
  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-cloud doorframe mac" itemprop="articleBody">
      
        <p>&emsp;&emsp;前面几篇学了基本的SQL语句和用工具操作数据库，今天讲一下用代码操作数据库。</p>
<h4 id="连接MySQL"><a href="#连接MySQL" class="headerlink" title="连接MySQL"></a>连接MySQL</h4><p>&emsp;&emsp;<strong><em>首先记得需要导包，jdbc连接MySQL数据库的jar包，名字：mysql-connector-java</em></strong></p>
<p>&emsp;&emsp;<strong><em>首先记得需要导包，jdbc连接MySQL数据库的jar包，名字：mysql-connector-java</em></strong></p>
<p>&emsp;&emsp;<strong><em>首先记得需要导包，jdbc连接MySQL数据库的jar包，名字：mysql-connector-java</em></strong></p>
        
          <p class="article-more-link">
            <a href="/2018/10/11/JDBC的简单使用——MySQL/#more">阅读全文</a>
          </p>
        
      
    </div>
    
  </div>
  
  
</article>

  
    <article id="post-MySQL数据库操作（五）——多表查询" class="article global-container article-type-post" itemscope itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/2018/10/11/MySQL数据库操作（五）——多表查询/">MySQL数据库操作（五）——多表查询</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/2018/10/11/MySQL数据库操作（五）——多表查询/" class="article-date">
  <time datetime="2018-10-11T14:50:45.000Z" itemprop="datePublished">2018-10-11</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/数据库-MySQL/">数据库 -MySQL</a>
  </div>

    
  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-cloud doorframe mac" itemprop="articleBody">
      
        <h3 id="合并结果集-union-all-包含相同行-、union-去除相同行"><a href="#合并结果集-union-all-包含相同行-、union-去除相同行" class="headerlink" title="合并结果集 union all(包含相同行)、union(去除相同行)"></a>合并结果集 <code>union all(包含相同行)、union(去除相同行)</code></h3><p>&emsp;&emsp;把查询的结果合并到一起。<strong>要求：</strong> <code>查询的结果列数相同，列类型相同</code></p>
        
          <p class="article-more-link">
            <a href="/2018/10/11/MySQL数据库操作（五）——多表查询/#more">阅读全文</a>
          </p>
        
      
    </div>
    
  </div>
  
  
</article>

  
    <article id="post-MySQL数据库操作（四）——多表之间的关系" class="article global-container article-type-post" itemscope itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/2018/10/11/MySQL数据库操作（四）——多表之间的关系/">MySQL数据库操作（四）——多表之间的关系</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/2018/10/11/MySQL数据库操作（四）——多表之间的关系/" class="article-date">
  <time datetime="2018-10-11T14:50:29.000Z" itemprop="datePublished">2018-10-11</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/数据库-MySQL/">数据库 -MySQL</a>
  </div>

    
  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-cloud doorframe mac" itemprop="articleBody">
      
        <h3 id="主键与外键"><a href="#主键与外键" class="headerlink" title="主键与外键"></a>主键与外键</h3><p><code>1、一张表可以有多个外键</code></p>
<p><code>2、外键是表的主键，可以是别的表，也可以是本身（少见）</code></p>
<p><code>3、外键可以为null，可以重复，但是不能不存在，必须要查的到</code></p>
<p><strong>创建语法</strong> <code>foreign key(本表的列名) references 关联的表名(关联表的主键)</code></p>
        
          <p class="article-more-link">
            <a href="/2018/10/11/MySQL数据库操作（四）——多表之间的关系/#more">阅读全文</a>
          </p>
        
      
    </div>
    
  </div>
  
  
</article>

  
    <article id="post-MySQL数据库操作（三）——数据库的备份与恢复" class="article global-container article-type-post" itemscope itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/2018/10/11/MySQL数据库操作（三）——数据库的备份与恢复/">MySQL数据库操作（三）——数据库的备份与恢复</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/2018/10/11/MySQL数据库操作（三）——数据库的备份与恢复/" class="article-date">
  <time datetime="2018-10-11T14:50:13.000Z" itemprop="datePublished">2018-10-11</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/数据库-MySQL/">数据库 -MySQL</a>
  </div>

    
  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-cloud doorframe mac" itemprop="articleBody">
      
        <h3 id="数据库的备份与恢复"><a href="#数据库的备份与恢复" class="headerlink" title="数据库的备份与恢复"></a>数据库的备份与恢复</h3><p><strong>备份</strong>：<code>mysqldump -u用户名 -p密码 数据库名&gt;生成的脚本路径</code></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">//末尾没有分号，也不要登录</span><br><span class="line">mysqldunp -uroot -p123 school&gt;C:a.sql</span><br></pre></td></tr></table></figure>
<p><strong>恢复</strong>：<code>mysqldump -u用户名 -p密码 数据库名&lt;生成的脚本路径</code></p>
<p><code>或者：登录之后，切换到需要恢复的数据库，输入：source 生成的脚本路径</code></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">//要先删除school数据库，再重新创建数据库，这两步需要登录</span><br><span class="line">//执行下面sql语句，不要登录，末尾没有分号</span><br><span class="line">mysqldunp -uroot -p123 school&lt;C:a.sql</span><br></pre></td></tr></table></figure>
        
          <p class="article-more-link">
            <a href="/2018/10/11/MySQL数据库操作（三）——数据库的备份与恢复/#more">阅读全文</a>
          </p>
        
      
    </div>
    
  </div>
  
  
</article>

  
    <article id="post-MySQL数据库操作（二）——DQL" class="article global-container article-type-post" itemscope itemprop="blogPost">
  
    <header class="article-header">
      
  
    <h1 itemprop="name">
      <a class="article-title" href="/2018/10/11/MySQL数据库操作（二）——DQL/">MySQL数据库操作（二）——DQL</a>
    </h1>
  

    </header>
  
  <div class="article-meta">
    <a href="/2018/10/11/MySQL数据库操作（二）——DQL/" class="article-date">
  <time datetime="2018-10-11T14:49:56.000Z" itemprop="datePublished">2018-10-11</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/数据库-MySQL/">数据库 -MySQL</a>
  </div>

    
  </div>
  

  <div class="article-inner">
    
    <div class="article-content article-content-cloud doorframe mac" itemprop="articleBody">
      
        <h3 id="DQL"><a href="#DQL" class="headerlink" title="DQL"></a>DQL</h3><p>关键字：select、from、where、group by、having、roder by</p>
        
          <p class="article-more-link">
            <a href="/2018/10/11/MySQL数据库操作（二）——DQL/#more">阅读全文</a>
          </p>
        
      
    </div>
    
  </div>
  
  
</article>

  


  <nav id="page-nav">
    
    <a class="extend prev" rel="prev" href="/page/3/">&laquo; 上一页</a><a class="page-number" href="/">1</a><a class="page-number" href="/page/2/">2</a><a class="page-number" href="/page/3/">3</a><span class="page-number current">4</span><a class="page-number" href="/page/5/">5</a><a class="page-number" href="/page/6/">6</a><span class="space">&hellip;</span><a class="page-number" href="/page/8/">8</a><a class="extend next" rel="next" href="/page/5/">下一页 &raquo;</a>
  </nav>


</section>
        <aside id="sidebar">
  
    <div class="widget-box">
  <div class="avatar-box avatar-item">
    <img class="avatar" src="/uploads/artistic_image/head.jpg" title="头像来自网络"></img>
    <h3 class="avatar-name">
      
        海晨忆
      
    </h3>
    <p class="avatar-slogan">
      先谋生，再谋爱。人间值得，未来可期。
    </p>
  </div>
</div>


  
    
  <div class="widget-box">
    <h3 class="widget-title">分类</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/Android-Socket/">Android -Socket</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-加密算法/">Android -加密算法</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-常用功能/">Android -常用功能</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-框架/">Android -框架</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-源码解析/">Android -源码解析</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-自定义view/">Android -自定义view</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Android-设计模式/">Android -设计模式</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/JAVA-并发/">JAVA -并发</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Java-SpringBoot/">Java -SpringBoot</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Tomcat/">Tomcat</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/kotlin/">kotlin</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/数据库-JDBC/">数据库 -JDBC</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/数据库-MySQL/">数据库 -MySQL</a></li></ul>
    </div>
  </div>


  
    

  
    
  
    
  <div class="widget-box">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/07/">July 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/11/">November 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/10/">October 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/09/">September 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/08/">August 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/07/">July 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/06/">June 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/10/">October 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/05/">May 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/03/">March 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/02/">February 2018</a></li></ul>
    </div>
  </div>

  
    
  <div class="widget-box">
    <h3 class="widget-title">最新文章</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2021/07/27/JAVA—公平锁，非公平锁，悲观锁，乐观锁，死锁/">JAVA—公平锁，非公平锁，悲观锁，乐观锁，死锁</a>
          </li>
        
          <li>
            <a href="/2021/07/19/JAVA—线程同步器AQS/">JAVA—线程同步器AQS</a>
          </li>
        
          <li>
            <a href="/2021/07/07/Android模拟点击/">Android模拟点击</a>
          </li>
        
          <li>
            <a href="/2019/11/27/SpringBoot系列-消息-RabbitMQ-（二十）/">SpringBoot系列-消息(RabbitMQ)（二十）</a>
          </li>
        
          <li>
            <a href="/2019/11/13/SpringBoot系列-Docker（十九）/">SpringBoot系列-Docker（十九）</a>
          </li>
        
      </ul>
    </div>
  </div>

  
      <div class="widget-box">
    <h3 class="widget-title">友情链接</h3>
    <div class="widget">
      
        <a class="hrf" style="display: block;" href="https://github.com/haichenyi" title target='_blank'
        >Github</a>
      
        <a class="hrf" style="display: block;" href="https://www.jianshu.com/u/6077ee440c37" title target='_blank'
        >简书</a>
      
        <a class="hrf" style="display: block;" href="https://blog.csdn.net/qq_27634797" title target='_blank'
        >CSDN</a>
      
    </div>
  </div>

  
</aside>
      </div>
      <footer id="footer">
  <div class="foot-box footers global-width">
    &copy;2017-2021 海晨忆 &nbsp;&nbsp;
    <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span id="busuanzi_container_site_pv">阁下是第<span id="busuanzi_value_site_pv"></span>个访客</span>
  </div>
</footer>
      <script src="https://code.jquery.com/jquery-2.0.3.min.js"></script>
<script>
if (!window.jQuery) {
var script = document.createElement('script');
script.src = "/js/jquery-2.0.3.min.js";
document.body.write(script);
}
</script>

  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/script.js"></script>



    </div>
    <nav id="mobile-nav" class="mobile-nav-box">
  <div class="mobile-nav-img mobile-nav-top"></div>
  
    <a href="/" class="mobile-nav-link">首页</a>
  
    <a href="/archives" class="mobile-nav-link">归档</a>
  
    <a href="/about" class="mobile-nav-link">简历</a>
  
  <div class="mobile-nav-img  mobile-nav-bottom"></div>
</nav>    
  </div>
</body>
</html>